package com.ruoyi.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.course.domain.ExamCourseTagRelation;
import com.ruoyi.course.vo.ExamCourseTagRelationVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 课程标签关联Mapper接口
 *
 * @author Tellsea
 * @date 2025-09-25
 */
public interface ExamCourseTagRelationMapper extends BaseMapper<ExamCourseTagRelation> {

    Page<ExamCourseTagRelationVo> queryList(Page<?> page, @Param("entity") ExamCourseTagRelationVo entity);

    List<ExamCourseTagRelationVo> queryList(@Param("entity") ExamCourseTagRelationVo entity);

    ExamCourseTagRelationVo queryById(@Param("id") Long id);

    /**
     * 批量插入课程标签关系
     *
     * @param courseId 课程ID
     * @param tagIds 标签ID列表
     * @return 插入成功的记录数
     */
    int batchInsertTagRelations(@Param("courseId") Long courseId, @Param("tagIds") List<Long> tagIds);

}
